<?php
/**
* @package      auto_occasion
* @subpackage   admin
* @author       CMS
* @copyright    2011
* @license      All rights reserved
*/

class passwordCtrl extends jController {

	
      public $pluginParams = array(
        '*'=>array('auth.required'=>false)
      );

    

    /**
    * Verifie si un utilisateur existe
    */
    function checkUser() {
        $rep = $this->getResponse('json');
        jClasses::inc('admin~compteSrv');

        $return= 0;
        $login = $this->stringParam('login', '');
        $email = $this->stringParam('email', '');

        if ($login && $email) {
            if (compteSrv::checkUser($login, $email)) {
                compteSrv::sendUsersAcces($login);
                $return = 1;
            }
        }

        $rep->data = $return;

        return $rep;
    }
}

